From bans on plastic bags to preventing the sale of foie gras, California has enacted plenty of new rules within the past few years in hopes of improving both the environment and quality of life.

Despite these efforts, the Golden State has somehow still ranked dead last – behind New Jersey and Indiana – among U.S. states in quality of life, according to a study by U.S. News.

Each state was judged on both natural environment and social environment.

"A person's quality of life is largely a result of their interactions with those around them," the magazine wrote.

U.S. News also ranked each state in seven other areas, which were weighted based on a survey that determined their importance to the public: health care, education, economy, opportunity, infrastructure, crime and corrections and fiscal stability.

Though the state seemed to fail U.S. News' tests, that doesn't mean politicians are ready to give up. Here's a look at some bans and regulations the state has enforced (or might soon).

Mandated solar panels

The first state in nation to do so, California is mandating all new homes have solar panels. In an effort to cut down on greenhouse gas emissions, the new regulation requires all homes and apartments built after 2020 to have the solar panels.

This regulation will add about $10,000 in construction costs to single-family homes. However, according to the California Energy Commission which approved the policy in a unanimous vote on May 9, the panels could generate more energy savings.

No non-rescue animals in pet stores

California will become the first state to prohibit pet stores from selling dogs, cats or rabbits that aren't rescues, thanks to legislation signed by Gov. Jerry Brown in October.

Starting in January 2019, pet stores will be required to obtain animals from “a public animal control agency or shelter, society for the prevention of cruelty to animals shelter, humane society shelter, or rescue group … that is in a cooperative agreement with at least one private or public shelter.” Stores will face up to $500 fines for the sale of each animal that is not determined to be a rescue, according to the Los Angeles Times.

The bill's passage also makes California the first state to ban the sale of animals from so-called puppy mills or mass breeding.

No more cosmetics testing on animals

Sen. Cathleen Galigiana, D-Stockton, also hopes California will become the first state to ban cosmetics testing on animals.

Galigiana's bill, called the California Cruelty-Free Cosmetics Act, would make it illegal for any cosmetic manufacturer to "knowingly import or sell any cosmetic, including personal hygiene products such as deodorant, shampoo or conditioner in California, if the final product or any component of the product was tested on animals after Jan. 1, 2020.”

Violators would face a fine up to $500 for their first offense, and up to $1,000 for each subsequent violation.

Ban on plastic bags

California became the first state in the U.S. to ban single-use plastic bags in 2015, according to the San Diego Union-Tribune. Businesses that continue to offer the bags have to charge customers a fee.

Limit state-funded travel

California blocked state-funded travel to multiple states in June that had what the state attorney general considered anti-LGBT policies. Those states were: Alabama, Kentucky, South Dakota and Texas.

Non-essential state-funded travel was already banned from Kansas, Mississippi, North Carolina and Tennessee.

Restriction on pets

California bars the possession of certain “restricted animals” without a specific permit, including hamsters, ferrets and gerbils.

Hedgehogs, certain parakeets and piranhas are also banned from being kept as pets.

Cars with internal combustion engines could go

Cars with internal combustion engines could soon be banned in California.

Mary Nichols, the California Air Resources Board chair, told Bloomberg that Gov. Jerry Brown is interested in a potential ban. However, she said banning cars with internal combustion engines wouldn’t happen in the next 10 years.

CALIFORNIA COULD BAN CARS WITH INTERNAL COMBUSTION ENGINES, REGULATOR SAYS

Foie gras is a faux pas

California’s foie gras ban was reinstated in September by a federal appeals court. It found that a state law preventing sales of the food product made by force-feeding ducks and geese was not preempted by federal authority to regulate poultry products.

The ban was signed into law in 2004 after proponents said the process of fattening the birds’ livers was cruel and inhumane. The law took effect in 2012, but was blocked by a court in 2015, delighting chefs who wanted to serve it.

Fox News' Jennifer Earl, Kaitlyn Schallhorn, Brooke Singman and The Associated Press contributed to this report.